package day11;

public class MyRunnable implements Runnable{
	private int start;
	private String name;
	public MyRunnable(String name,int start) {
		this.name = name;
		this.start = start;
	}
	@Override
	public void run() {
		for(int i = start; i <= 100; i += 2) {
			System.out.println(name + "运行" + i);
		}
	}
	public static void main(String[] args) {
		MyRunnable myRunnable1 = new MyRunnable("222", 2);
		Thread thread2 = new Thread(myRunnable1);
		thread2.start();
		MyRunnable myRunnable = new MyRunnable("411", 1);
		Thread thread = new Thread(myRunnable);
		thread.start();
		
	}
}
